<body>
<p>
    This tests that in a html document with inline audio content, the media element repaints correctly
    while playing.
</p>
<audio controls autoplay onplaying="playing(0)" src="content/silence.wav"></audio><br/>
<audio controls autoplay onplaying="playing(1)" src="content/silence.wav" style="margin-bottom:25px; -webkit-box-reflect:below;"></audio><br/>
<audio controls autoplay onplaying="playing(2)" src="content/silence.wav" style="margin:27px 0; transform: rotate(15deg);"></audio><br>
<script>
    // Note: can't dump repaint rects here (yet) because this is trying to
    // test autoplaying and window.internals doesn't exist at the right time
    // to start tracking repaint rects.
    if (window.testRunner)
        testRunner.waitUntilDone();

    var count = 3;
    var audioElements = document.getElementsByTagName('audio');

    function playing(i) {
        var audio = audioElements[i];
        audio.pause();
        audio.addEventListener("seeked", function() {
        if (!--count && window.testRunner)
            testRunner.notifyDone();
        }, true);
        audio.currentTime = audio.duration * 0.50;
    }
</script>
</body>
